package com.wlyuan.index.domain.source.valueobj;

import com.wlyuan.core.marker.INamed;
import com.wlyuan.core.marker.NamedMap;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

@Getter
@RequiredArgsConstructor
public enum Highlight implements INamed<Integer> {
    SIGN_EXCEPTION(1, "签收异常"),
    RECEIPT_LOST(2, "回单丢失"),
    RECEIPT_PHOTO(3, "上传回单照片"),
    RECEIPT_RECOVERED(4, "回单补单"),
    RECEIPT_REVIEWED(5, "回单复核");

    private final Integer value;
    private final String name;
    private static final Integer MARKED = 1;
    private static final Map<Integer, Highlight> MAP = new NamedMap<>(Highlight.values());

    public static Highlight valueOf(Integer value) {
        return MAP.get(value);
    }

    public static boolean marked(Integer status) {
        return MARKED.equals(status);
    }
}
